// eslint-disable-next-line
// import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
// import { UserLayout, BasicLayout, RouteView, BlankLayout } from '@/layouts'
import { UserLayout, BasicLayout, RouteView } from '@/layouts'
import { iconHomeDoor, iconHomeHouse, iconHomeHouse2, iconHomePaper } from '@/core/icons'
export const asyncRouterMap = [{
  path: '/',
  component: BasicLayout,
  meta: { title: '首页' },
  redirect: '/dashboard',
  children: [{
    path: '/dashboard',
    name: 'dashboard',
    component: RouteView,
    redirect: '/house/status/house-list',
    hideChildrenInMenu: true,
    meta: { title: '房态管理', keepAlive: true, icon: iconHomeHouse, permission: ['dashboard'] },
    children: [{
      path: '/house/status/house-list',
      name: 'Analysis',
      component: () =>
                        import('@/views/house/status/HouseList'),
      meta: { title: '房屋列表', hidden: true, keepAlive: false, permission: ['dashboard'] }
    }]
  },
  // 入住管理
  {
    path: '/order',
    name: 'order',
    component: RouteView,
    redirect: '/order/list',
    hideChildrenInMenu: true,
    meta: { title: '入住管理', icon: iconHomePaper, permission: ['order'] },
    children: [{
      path: '/order/list',
      name: 'OrderList',
      hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
      component: () =>
                        import('@/views/order/List'),
      meta: { title: '订单列表', hidden: true, keepAlive: true, permission: ['order'] }
    }]
  },
  // 门锁管理
  {
    path: '/lock',
    name: 'lock',
    component: RouteView,
    redirect: '/lock',
    hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
    meta: { title: '门锁管理', icon: iconHomeDoor, keepAlive: true, permission: ['lock'] },
    children: [{
      path: '/lock',
      name: 'LockList',
      redirect: '/lock/list/content',
      hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
      component: () =>
                        import('@/views/lock/List'),
      meta: { title: '门锁列表', keepAlive: true, permission: ['lock'] },
      children: [{
        path: '/lock/list/content',
        name: 'LockContent',
        component: () =>
                                import('@/views/lock/modules/LockContent'),
        meta: { title: '门锁列表', hidden: true, keepAlive: true, permission: ['lock'] }
      }
      // 暂时隐藏
      // ,{
      //   path: '/lock/list/history',
      //   name: 'LockHistory',
      //   component: () =>
      //                             import('@/views/lock/modules/LockHistoryContent'),
      //   meta: { title: '开门记录', hidden: true, keepAlive: true, permission: ['lock'] }
      // }
      ]
    }]
  },
  // 房源管理
  {
    path: '/house/resource',
    name: 'resource',
    component: RouteView,
    redirect: '/house/resource',
    hideChildrenInMenu: true,
    meta: { title: '房源管理', icon: iconHomeHouse2, permission: ['resource'] },
    children: [{
      path: '/house/resource',
      name: 'HouseResourceList',
      hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu
      redirect: '/house/resource/list/source',
      component: () =>
                        import('@/views/house/resource/List'),
      meta: { title: '房源列表', keepAlive: true, permission: ['resource'] },
      children: [{
        path: '/house/resource/list/source',
        name: 'HouseResourceListSource',
        component: () =>
                                import('@/views/house/resource/source/SourceContent'),
        meta: { title: '房源列表', hidden: true, keepAlive: true, permission: ['resource'] }
      }
      // ,{
      //   path: '/house/resource/list/store',
      //   name: 'HouseResourceListStore',
      //   component: () =>
      //                             import('@/views/house/resource/store/StoreContent'),
      //   meta: { title: '门店管理', hidden: true, keepAlive: true, permission: ['resource'] }
      // }
      ]
    }]
  }
  ]
},
{
  path: '*',
  redirect: '/404',
  hidden: true
}
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [{
  path: '/user',
  component: UserLayout,
  redirect: '/user/login',
  hidden: true,
  children: [{
    path: 'login',
    name: 'login',
    component: () =>
                    import(/* webpackChunkName: "user" */ '@/views/user/Login')
  },
  {
    path: 'register',
    name: 'register',
    component: () =>
                    import(/* webpackChunkName: "user" */ '@/views/user/Register')
  },
  {
    path: 'register-result',
    name: 'registerResult',
    component: () =>
                    import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  }
  ]
},

// {
//   path: '/test',
//   component: BlankLayout,
//   redirect: '/test/home',
//   children: [{
//     path: 'home',
//     name: 'TestHome',
//     component: () =>
//                 import('@/views/Home')
//   }]
// },

{
  path: '/404',
  component: () =>
            import(/* webpackChunkName: "fail" */ '@/views/exception/404')
}

]
